package com.danke.blog.controller;

import org.jasypt.encryption.StringEncryptor;
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Hello World 控制器.
 * 
 * @author <a href="/"></a>
 * @date 2017年1月26日
 */
@RestController
public class HelloController {

	@RequestMapping("/hello")
	public String hello() {
	    return "Hello World! Welcome to visit waylau.com!";
	}

	public static void main(String[] args) {
		StringEncryptor stringEncryptor = new StandardPBEStringEncryptor();
		((StandardPBEStringEncryptor) stringEncryptor).setPassword("a1b2c3d4e5");
		String result = stringEncryptor.encrypt("root");
		System.out.println(result);
	}
 
}
 